﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchProjectsControl.ascx.cs"
    Inherits="controls_SearchProjectsControl" %>
<table style="width: 100%;">
    <tr>
        <td style="width: 50%; vertical-align: top;">
            <div class="section">
                <h4 class="header">
                    Search Projects by Factors</h4>
                <div style="width: 100%; text-align: right; font-weight: bold">
                    Mandatory</div>
                <table style="width: 100%;">
                    <asp:Repeater ID="m_rptFactorsCategories" runat="server" DataSource="<%# this.ProjectManager.FactorsCategories %>">
                        <ItemTemplate>
                            <tr>
                                <td colspan="2">
                                    <span style="font-size: 13px; font-weight: bold;">
                                        <asp:Literal ID="m_lblFactorName" runat="server" Text='<%# Eval("Name") %>' />:
                                    </span>
                                </td>
                            </tr>
                            <asp:Repeater ID="m_Repeater" runat="server" DataSource='<%# Eval("Factors") %>'>
                                <ItemTemplate>
                                    <tr>
                                        <td style="width: 50%;">
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>' />:
                                        </td>
                                        <td style="width: 45%;">
                                            <asp:HiddenField ID="m_hfFactorID" runat="server" Value='<%# Eval("FactorID") %>' />
                                            <asp:DropDownList ID="m_ddlFactorScale" runat="server" AppendDataBoundItems="true"
                                                OnSelectedIndexChanged="FactorsScale_IndexChanged" Width="100%" DataSource='<%# ((ICollection<ProjectStorageDB.FactorScale>)Eval("FactorScales")).OrderBy(fc=> fc.Order) %>'
                                                DataTextField="Value" DataValueField="FactorScaleID">
                                                <asp:ListItem Value="" Text="None" Selected="true" />
                                            </asp:DropDownList>
                                        </td>
                                        <td style="width: 5%;">
                                            <div>
                                                <asp:CheckBox ID="chbMandatory" runat="server" />
                                            </div>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
        </td>
    </tr>
</table>
<asp:Button ID="m_btnSearch" runat="server" CssClass="formButton" OnClick="Search_Click"
    Text="Search" />
